import {Component, OnInit} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {ResultList} from './result-list';
import {RequestMapping} from './request.mapping';
import {Route} from '@angular/router';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'app';
  _menus = [];

  constructor(public http: HttpClient,public router:Route) {
  }

  ngOnInit(): void {
    this.http.get<ResultList>(RequestMapping.SYSTEM_MENUS).subscribe(response => {
      this._menus = response.data;
    });
  }

  login() {
    this.router.redirectTo = ""
  }


}
